$(document).ready(function() {
		// Tabs
		$('#tabs a').tabs();
		
		// Menu
		$('#menu > ul').superfish({
			hoverClass	 : 'sfHover',
			pathClass	 : 'overideThisToUse',
			delay		 : 0,
			animation	 : {height: 'show'},
			speed		 : 'normal',
			autoArrows   : false,
			dropShadows  : false, 
			disableHI	 : false, /* set to true to disable hoverIntent detection */
			onInit		 : function(){},
			onBeforeShow : function(){},
			onShow		 : function(){},
			onHide		 : function(){}
		});
	
		$('#menu > ul').css('display', 'block');
		
		
		$('#dashboard').addClass('selected');
		
		//loading
		$('#loading_ajax').ajaxStart(function(){
			$(this).show();
		});
		
		$('#loading_ajax').ajaxStop(function(){
			$(this).hide();
		});
		
		$('#loading_ajax').ajaxComplete(function(){
			$(this).hide();
		});
		$('#loading_ajax').ajaxSuccess(function(){
			$(this).hide();
		});
		
		$.ajaxSetup({
			cache: false
		});
		
		// Check all or uncheck
			$('#check_all').toggle(
			function() {
			$('#content').find('input[type=checkbox]').attr('checked', true);
			},
			function() {
			$('#content').find('input[type=checkbox]').attr('checked', false);
			});
		
		//Table grid
		$('#flexme').flexigrid({height: 'auto'});
		//$(".ajax").colorbox();		
});
function do_del(id) {
		
		var ok = confirm('Are you sure that you want to delete this item?');
		var url = $('#action_del_' + id).attr('href');
		if(ok) {
			window.location.href = url;
		}
	}